define(['angularAMD'], function (angularAMD) {
    angularAMD.service('OSbackSettingService', ['$rootScope', '$filter', '$translate', 'config', 'MMWService', '$mdDialog',
        function($rootScope, $filter, $translate, config, $MMWService, $mdDialog){
            var _service = this;        
            _service.init = function(options){
                $mdDialog.dialog(
                    'module/moduleB/program/B02/B0217/OSbackSetting.html',
                    function(dialog){
                        return {
                            css_url:'module/moduleB/program/B02/B0217/OSbackSetting.css',
                            parent:options.parent,
                            os_back_setting:options.os_back_setting,
                            beforeShown: function(){
                            },
                            back: function () {
                                dialog.hide();
                                if(options.close)
                                    options.close();
                            },
                            confirm: function () {
                                if(options.callback)
                                    options.callback(dialog);
                            }
                        };
                    }
                );
            };
        }]);
});
